package com.ayue.clinet.mqspringboot.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 消息队列模式枚举
 *
 * @author yuelinbo
 * @date 2020/3/25 11:12
 **/
@Getter
@AllArgsConstructor
public enum QueueEnum {


    /**
     * simple 点对点模式
     */
    QUEUE_SIMPLE(null, "simple-queue", null),


    /**
     * work工作模式
     */
    QUEUE_WORK(null, "work-queue", null),

    /**
     * direct直连模式
     */
    QUEUE_DIRECT("direct-exchange", "direct-queue", "direct-router-key"),

    /**
     * fanout交换机
     */
    QUEUE_FANOUT("fanout-exchange", "fanout-queue", null),

    /**
     * topic交换机
     * routerKey中：符号#可以匹配一个或多个词，test.#: --->可以匹配到 test.A.B
     * routerKey中：符号*只能匹配一个  test.*   ----> 只能匹配到 test.A  或者test.B
     */
    QUEUE_TOPIC("topic-exchange", "topic-queue", "topic.router.key."),

    /**
     * 延迟队列
     */
    QUEUE_DELAY("delay-exchange","delay.queue","delay.routing.key");


    private String exchange;
    private String queueName;
    private String routerKey;
}
